package com.uit3j.cloud.product.feign;

import com.uit3j.cloud.api.product.bo.EsHotSearchBO;
import com.uit3j.cloud.api.product.feign.HotSearchFeignClient;
import com.uit3j.cloud.common.response.ServerResponseEntity;
import com.uit3j.cloud.product.service.HotSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tan
 * @date 2020/11/27
 */
@RestController
public class HotSearchFeignController implements HotSearchFeignClient {

    @Autowired
    private HotSearchService hotSearchService;


    @Override
    public ServerResponseEntity<EsHotSearchBO> loadEsHotSearchBO(Long hotSearchId) {
        EsHotSearchBO esHotSearchBO = hotSearchService.loadEsHotSearchBO(hotSearchId);

        return ServerResponseEntity.success(esHotSearchBO);
    }


}
